#include "encoding.hpp"
#include "unittest.hpp"
#include "log.hpp"
using namespace sdl_engine;

int main(int argc, char** argv) {
    log::Logger::SetDefaultLevel(log::Logger::NO_LOG);
    log::Init(argc, argv);
    unit_test::unittest.AddTest([](){
        TEST_TRUE(Hex2UTF8String(0x3C) == "\u003C");
        TEST_TRUE(Hex2UTF8String(0xBB) == "\u00BB");
        TEST_TRUE(Hex2UTF8String(0x123) == "\u0123");
        TEST_TRUE(Hex2UTF8String(0x900) == "\u0900");
        TEST_TRUE(Hex2UTF8String(0x2A3C) == "\u2A3C");
        TEST_TRUE(Hex2UTF8String(0xFB02) == "\uFB02");
        TEST_TRUE(utf8string("这是中文123").to_string() == "这是中文123");
        TEST_TRUE((utf8string("这是中文123") + utf8string("好123")).to_string() == "这是中文123好123");
    });
    unit_test::unittest.RunTests();
    return 0;
}
